package main.function;

import main.impl.DisplayImpl;

/**
 * 在 CountDisplay 类的基础 增加新功能，根据步长 增长显示
 */
public class IncreaseDisplay extends CountDisplay{
    private Integer step;//增长步长

    public IncreaseDisplay(DisplayImpl impl, Integer step) {
        super(impl);
        this.step = step;
    }

    public void increaseDisplay(int level){
        int count = 0;
        for (int i = 0; i < level;i++) {
            multiDisplay(count);
            count+=step;
        }
    }
}
